home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part1 / 6170 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.8 KB

  1. Path: mics.demon.co.uk!Bill
  2. From: Bill Michell <Bill@mics.demon.co.uk>
  3. Newsgroups: comp.lang.c++
  4. Subject: Re: READ THIS!!!!!!!!!!!
  5. Date: Sun, 11 Feb 1996 00:53:49 +0000
  6. Organization: None
  7. Distribution: world
  8. Message-ID: <qLcY4jAd4THxEwxK@mics.demon.co.uk>
  9. References: <4em5fs$a86@ixnews4.ix.netcom.com>
  10.  <4er65q$d8v@usenet1.sjc.in.sel.sony.com>
  11.  <ALUN.CHAMPION.96Feb1201845@g7240065.bridge.bst.bls.com>
  12.  <00001a81+00009bbb@msn.com> <jtessinDMFw3D.2EH@netcom.com>
  13. NNTP-Posting-Host: mics.demon.co.uk
  14. X-NNTP-Posting-Host: mics.demon.co.uk
  15. MIME-Version: 1.0
  16. X-Newsreader: Turnpike Version 1.11 <uiEOes1orVXTvvWgSAnAOBUy+p>
  17.  
  18. In article <jtessinDMFw3D.2EH@netcom.com>, John Tessin
  19. <jtessin@netcom.com> writes
  20. >Come on Matt, you're just mad about the header.  You know that C & C++ 
  21. >programmers are all secretly searching for the case where "goto" is the 
  22. >ONLY way to solve a coding problem, and thereby justify its existence. :)
  23.  
  24. C++ already includes plenty of pseudonyms for goto:
  25. - break;
  26. - return <returnvalue>;
  27. - else
  28.  
  29. Even branch instructions have an implicit goto...
  30.  
  31. Just because the compiler hides such details, it soesn't mean the
  32. underlying function isn't necessary.
  33.  
  34. However, I can't admit that an explicit goto is *necessary*. It is
  35. *always* possible to code a program differently - even if an optimising
  36. compiler doesn't reduce the code to the same thoing regardless.
  37.  
  38. The only thing that one can conclusively say about goto is that it makes
  39. your resulting code less readable, and less maintainable. IMHO, this is
  40. enough to justify the removal of goto from the ANSI spec.
  41.  
  42. Any programmer that regularly (or even ever) uses goto ought really
  43. (unless they happen to be using assemebler) to learn more about
  44. structured programming, if they ever want their skills to be marketable.
  45.  
  46. Code without a goto is easier for *other people* to follow. This is the
  47. key.
  48.